package com.yizhuoyan.his.dao;

import com.yizhuoyan.his.entity.DocHerbalPrescriptionDetailEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (DocHerbalprescriptionDetail)表数据库访问层
 *
 * @author yizhuoyan@yizhuoyan.com
 * @since 2020-02-20 15:06:04
 */
public interface DocHerbalPrescriptionDetailDao extends TemplateDao<Long, DocHerbalPrescriptionDetailEntity>{

    //额外方法
    /**
     * 查询患者对应的中药处方
     * @param id
     * @return中药的处方
     * @throws Exception
     * @throws NullPointerException
     */
    List<DocHerbalPrescriptionDetailEntity> selectHerbalPrescriptionDetailById(@Param("id") long id)throws Exception;

    /**
     * 通过中草药处方的id来删除该处方的详情
     * @param HerbalPrescriptionId 中草药处方id
     * @throws Exception id错误、不存在等等
     * @throws NullPointerException 对应数据不存在
     */
    void deleteByHerbalPrescriptionId(long HerbalPrescriptionId)throws Exception;
}